package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Slf4j  //当前类中可以直接使用log对象，会产生一个log对象直接使用
public class LogController1 {
    @RequestMapping("/log1")
    public void log(){
        log.trace("trace log2");
        log.debug("debug log2");
        log.info("info log2");
        log.warn("warm log2");
        log.error("error log2");
    }
}
